#KEY:M-s

return unless defined $kf;
my $fin=&get_fn($kf);
(my $e=$fin)=~s/.*\.//;
return unless defined $e;
(my $f=$fin)=~s/\.[^.]*$//;

my $bak=$f.".bak.".$e;
my $ext;
my $fmt;
system("cp -pR $fin $bak") unless -f $bak;
given($e){
    when([/jpg/i,/jpeg/i]){
	$fmt="jpeg";
	$ext=$e;
    }
    when(/png/i){
	$fmt="png";
	$ext=$e;
    }
    default{
	$fmt="jpeg";
	$ext="jpg"
    }
}
my $fout=$f.".".$e;
$pix->save($fout,$fmt,"quality" => 90);

1;
